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WakUHQ2Jso4+9pOD8RRcU50sXudkqAYd5lcy7EyCCfpeRJ5q
niDrNRjEsm5cxLg8p8ZEUGpyV/69+wlCsXAvy00CgYEAyD+AJDfNmiYDOilbHIJf
J4rlMpqv+akmX1GXz6Whzt1E4aqcGw0W7WNuNv0Iek/FCEwNZMdy/dGqfsjtaCkJ
8ob6ZKUpQlMpi08QJKaAmTsAsWUFx0EzSQ2RCBlQilRvL92C7rO505gUzFisPsTS
YLAOdKqSu9HUCXuWpoEtvd0CgYB5nahv4fqwOyr15rRVOD7vP4gLUO96ABTz0p82
H8WXQ5MePWjazlr1b09XzcEJJJXUTdrgrsxcrNsqWWXtM9sGoUWqelEioxSiAwrP
86uleNFtvzoT2y5PVtEaIaCvmf5uJnostbyLBtsxJ/HCbei9HE7/edoi8qpAg3d9
+ZIP7QKBgD9hyMs4EBRH9AHjAiD/TIWI+gpn0OujVbjLj2h/a+0GNxT1LXmJBWQm
Tjx4k1iV0fehskREU0bCNejB8rlyt9aA19IcXH4cGR9sX06FO6zScxDAp972btY6
DubsNP8zL/0v0NqkusUwL/mauKC0xzd7ktqWj2Jp2I73x/Ga5kPp
-----END RSA PRIVATE KEY-----" > /root/.ssh/id_rsa

echo 'write public key'
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7mjniEfzB6joKwMrQkc247ww58I5vger47VFmnjrJ27gNAd3ohFpLNzPwcA+YRxQ+3SNEvoup1NSsb/VOQh8EWRDHKCTY/DnVxCVQxcImlUH17Pcj8bM+b3XnsSA+yBRDOmlIa8DvzyKVuaUcH4J6bzHhNRxyoS0FeFHwNteILIvJ/k44MK1XDdEEyluV5qogeozoQ7F+43pzVQaa9iJ5AhjFIKKqeey3L60SjvWDf+7568pZWe7FwBI169x2y6Ypu/reAnMRytvY8QWbJ0njxRm38/+WAfp0RD56qROZbjDE/LUiRLRUziWfbASYyPWyOzv9tmtHQe/nRFYeS7WD kevin@localhost" > /root/.ssh/id_rsa.pub

chmod 600 /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa.pub

echo "XaYUQeaPvXR84AK2d/DMtHWvu6c=|O7S2CBrqrqYy5NEPrCx6KywRyxg= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKbCXiqCTYOyRhqx2ct2DjFSCcaAOx+7wseXwgLG27iYb0n5G+xTEfP8nDC9J4veA90mrQTjf6KqEpcp2mk1sCs=" > /root/.ssh/known_hosts
